//
//  SpecialCollectionViewCell.m
//  OverseasOnlineShopping
//
//  Created by 唐先才 on 16/3/9.
//  Copyright © 2016年 唐先才. All rights reserved.
//

#import "SpecialCollectionViewCell.h"
#import "UIImageView+WebCache.h"

@interface SpecialCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UIImageView *tagView;
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UILabel *priceLab;
@property (weak, nonatomic) IBOutlet UILabel *mallLab;

@end

@implementation SpecialCollectionViewCell

- (void)setListModel:(ListRecommendInfoModel *)listModel {
    _tagView.image = [UIImage imageNamed: @"tag_nation"];
    [_iconView sd_setImageWithURL:[NSURL URLWithString:listModel.strMainImage]];
    _titleLab.text = listModel.strInfoTitle;
    _priceLab.text = listModel.strCommodityPrice;
    _mallLab.text = [NSString stringWithFormat: @"%@供货", listModel.mall[@"strMallName"]];
}

+ (UICollectionViewCell *)configCellWithCollectionView: (UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath dataArray: (NSMutableArray *)dataArray {
    SpecialCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"specialCollectionViewCell" forIndexPath:indexPath];
    if (dataArray.count > 0) {
        cell.listModel = dataArray[indexPath.row];
    }
    cell.backgroundColor = [UIColor whiteColor];
    return cell;
}

- (void)awakeFromNib {
    // Initialization code
}

@end
